<template>
  <div class="user-detail-avater">
    <img :src="avaterSrc" alt="用户头像" title="用户头像">
  </div>
</template>

<script>
export default{
  name: 'userAvater',
  props: {'avaterSrc': {
    type: String,
    default: ''
  }}, // 父子间组件通过props传递数据
  // 默认头像内联base64
  data () {
    return {

    }
  },
  mounted () {
    // console.log(this.$props.avaterSrc)
  }
}
</script>

<style lang="scss">
@import '../scss/mixin.scss';
  .user-detail-avater{
    margin: 0 0 10px 0;
    img{
      max-width: 100%;
      width: 7rem;
      height: 7rem;
      border-radius:50%;
      @include xlBorder();
    }
  }

</style>